<div class="span9">
	<legend>
		<div class="row-fluid">
			<div class="span8">
				<h2>Danh sách blog</h2>
			</div>
			<div class="span4" style="text-align:right;">
				<h2><a class="btn" href="/blog/add"><i class="icon-plus"></i> <strong>VIẾT BLOG</strong></a></h2>
			</div>
		</div>
	</legend>
	<?php if(!empty($this->userBlogs)){?>
		<?php $i = 0 ?>
		<?php foreach($this->userBlogs as $blog){ ?>
			<?php if ($i == 0){ ?><div class="row-fluid"><?php } ?>
            <div class="span4">
            	<?php if(isset($this->owner) && ($this->owner)){?>
            	<div class="blog-ctrl">
            		<a href="/blog/edit/bid/<?php echo $blog['id'];?>" title="Sửa blog"><i class="icon-edit"></i></a>
            		<a href="/blog/del/bid/<?php echo $blog['id'];?>" title="Xóa blog" onclick="return confirm('Bạn có muốn xóa bài blog này hay không?');"><i class="icon-remove"></i></a>
            	</div>
            	<?php } ?>
            	<div class="blog-thumb"><img src="<?php echo $blog['image'];?>" class="img-polaroid"></div>
              <h4><?php echo $blog['title'];?></h4>
              <small class="txtgrey">Viết lúc: <span><?php echo $blog['created_date']; ?></span></small>
              <p style="text-align:justify"><?php echo $blog['content'];?></p>
              <p><a class="btn" href="/blog/detail/bid/<?php echo $blog['id']; ?>">Xem thêm &raquo;</a></p>
            </div><!--/span-->
            <?php $i++ ?>
            <?php if($i == 3){ $i = 0;?>
            	</div><div class="blog-thumb-line"></div><!--/row-->
            <?php }?>		
		<?php } ?>
		<?php if($i != 0){ ?> </div><div class="blog-thumb-line"></div> <?php } ?>
		<?php echo $this->pagination ?>
	<?php }else{ ?>
    <div class="row-fluid">
      <div class="span12">
        <p class="text-info" style="text-align:center;">Chưa có blog nào !</p>
      </div>
    </div>
  <?php } ?>
</div><!--/span-->
<div class="span3">
<?php if (!empty($_SESSION['logginUser'])){?>
  <div>
    <p>Chào <a href="/blog/index/usid/<?php echo $_SESSION['logginUser']['uid']; ?>"><?php echo $_SESSION['logginUser']['fullname']; ?></a></p>
  </div>
  <?php }?>
	<ul class="thumbnails">
	  <li class="span12">
	    <div class="thumbnail">
	      <img data-src="holder.js/300x200" alt="" src="<?php echo $this->userInfo['avatar'];?>">
	      <h5 style="text-align:center"><a href="<?php echo $this->userInfo['profile_url'];?>"><?php echo $this->userInfo['fullname'];?></a></h5>
	      <p style="text-align:center">Tổng số blog: <a href="/blog/index/usid/<?php echo $this->usid; ?>"><?php echo $this->totalBlog ?></a></p>
	    </div>
	  </li>	  
	</ul>
	<img data-src="holder.js/300x200" alt="" src="/img/cunghoangdao320x222.gif">
</div><!--/span-->